import{_ as x}from"./ResourceCodeBlock.vue_vue_type_style_index_0_lang-2yNFGPOQ.js";import{d as k,a as t,o as s,b as r,w as o,e as c,m as l,f as w,E as y,A as R,a2 as V,t as E,p as $}from"./index-c80Lh_is.js";import"./CodeBlock-BSWXsm4g.js";import"./toYaml-sPaYOD3i.js";const T=k({__name:"ServiceConfigView",setup(F){return(B,M)=>{const u=t("RouteTitle"),m=t("DataSource"),f=t("KCard"),g=t("AppView"),h=t("RouteView");return s(),r(h,{name:"service-config-view",params:{mesh:"",service:"",codeSearch:"",codeFilter:!1,codeRegExp:!1}},{default:o(({route:e,t:d})=>[c(g,null,{title:o(()=>[l("h2",null,[c(u,{title:d("services.routes.item.navigation.service-config-view")},null,8,["title"])])]),default:o(()=>[w(),c(f,null,{default:o(()=>[l("div",null,[c(m,{src:`/meshes/${e.params.mesh}/external-services/for/${e.params.service}`},{default:o(({data:n,error:p})=>[p?(s(),r(y,{key:0,error:p},null,8,["error"])):n===void 0?(s(),r(R,{key:1})):n===null?(s(),r(V,{key:2,"data-testid":"no-matching-external-service"},{title:o(()=>[l("p",null,E(d("services.detail.no_matching_external_service",{name:e.params.service})),1)]),_:2},1024)):(s(),r(x,{key:3,resource:n.config,"is-searchable":"",query:e.params.codeSearch,"is-filter-mode":e.params.codeFilter,"is-reg-exp-mode":e.params.codeRegExp,onQueryChange:a=>e.update({codeSearch:a}),onFilterModeChange:a=>e.update({codeFilter:a}),onRegExpModeChange:a=>e.update({codeRegExp:a})},{default:o(({copy:a,copying:C})=>[C?(s(),r(m,{key:0,src:`/meshes/${n.mesh}/external-service/${n.name}/as/kubernetes?no-store`,onChange:i=>{a(_=>_(i))},onError:i=>{a((_,v)=>v(i))}},null,8,["src","onChange","onError"])):$("",!0)]),_:2},1032,["resource","query","is-filter-mode","is-reg-exp-mode","onQueryChange","onFilterModeChange","onRegExpModeChange"]))]),_:2},1032,["src"])])]),_:2},1024)]),_:2},1024)]),_:1})}}});export{T as default};
